#include <cstdio>
#include <cstring>

using namespace std;

typedef unsigned long long ull;
const int maxn=100000, maxk=130, len=2*maxk+4, mods=1000000007;

ull qpower(ull a, int n) {
    ull s=1;
    for (; n; n/=2) {
        if (n&1) s=s*a%mods;
        a=a*a%mods;
    }
    return s;
}

void mul(int n, ull c[len][len], ull a[len][len], ull b[len][len]) {
    for (int i=0; i<n; i++) {
        for (int j=0; j<n; j++) {
            c[i][j] = 0;
            for (int k=0, cnt=0; k<n; k++) {
                c[i][j] = c[i][j]+a[i][k]*b[k][j];
                cnt++;
                if (cnt>=17) {
                    c[i][j]%=mods;
                    cnt=0;
                }
            }
            c[i][j]%=mods;
        }
    }
}

void power(ull a[len][len], int n, int k) {
    static ull s[2][len][len], t[2][len][len];
    for (int i=0; i<len; i++) s[0][i][i] = 1;
    memcpy(t[0], a, sizeof t[0]);

    int i=0, j=0;
    for (; n; n/=2) {
        if (n&1) {
            mul(k, s[!j], s[j], t[i]);
            j=!j;
        }
        mul(k, t[!i], t[i], t[i]);
        i=!i;
    }
    memcpy(a, s[j], sizeof s[j]);
}

int main() {
    freopen("bird.in", "r", stdin);
    freopen("bird.out", "w", stdout);

    static ull tr[len][len];
    int n, k, a, b;
    scanf("%d %d %d %d", &n, &k, &a, &b);

    for (int j=1; j<=k; j++) {
        if (j>a && j<b) {
            tr[2*j][2*j+1] = tr[2*(j-1)][2*j+1] = tr[2*(j+1)][2*j+1] = 1;
        }
        for (int t=0; t<2; t++) {
            tr[2*j+t][2*j+t] = tr[2*(j-1)+t][2*j+t] = tr[2*(j+1)+t][2*j+t] = 1;
        }
    }

    power(tr, n-2, 2*k+2);

    printf("%llu\n", (tr[k][k-1]+tr[k][k+1]+tr[k][k+3])%mods*qpower(n-2, mods-2)%mods);

    fclose(stdin);
    fclose(stdout);
    return 0;
}
